//
//  GWControllerTool.m
//  新浪微博
//
//  Created by qianfeng on 16/1/13.
//  Copyright (c) 2016年 高炜. All rights reserved.
//

#import "GWControllerTool.h"
#import "GWMainViewController.h"
#import "GWNewfeatureController.h"
@implementation GWControllerTool
+(void)chooseRootViewController
{
    UIWindow *window =[UIApplication sharedApplication].keyWindow;
    NSString *keys =(__bridge NSString *)kCFBundleVersionKey;
    NSString *lastVersion =[[NSUserDefaults standardUserDefaults]objectForKey:keys];
    if ([[NSBundle mainBundle].infoDictionary[keys]isEqualToString:lastVersion]) {
        window.rootViewController =[[GWMainViewController alloc]init];
    }
    else
    {
        window.rootViewController =[[GWNewfeatureController alloc]init];
        [[NSUserDefaults standardUserDefaults]setObject:[NSBundle mainBundle].infoDictionary[keys] forKey:keys];
        [[NSUserDefaults standardUserDefaults]synchronize];
    }

}
@end
